package com.example.doer.reading.AppAdapters;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by doer on 2017/7/10.
 */

public class MyFragmentAdapter extends FragmentPagerAdapter {
    List<Fragment> list =new ArrayList<Fragment>();
    public MyFragmentAdapter(List<Fragment> l,FragmentManager fragmentManager){
        super(fragmentManager);
        this.list=l;
    }
    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
